#!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
@Project ：图灵学习 
@File    ：18.异步生成器.py
@IDE     ：PyCharm 
@Author  ：ChenLiGao
@Date    ：2024-11-11 09:45
'''
import asyncio


async def work():
    for item in range(1, 101):
        yield item



async def main():
    async for item in work():
        print(item)

if __name__ == '__main__':
    loop = asyncio.get_event_loop()
    loop.run_until_complete(main())